/* Check JER_Bitmatrix::Invertible(). */
#include <stdio.h>
#include "jerasure.h"
#include "reed_sol.h"

int main( int argc, char** argv )
{
	int *old_bitmatrix;
	int *inverse_matrix;
	int i, j;
	int m = atoi( argv[1] );
	int k = atoi( argv[2] );
	int w = atoi( argv[3] );
	
	srand48(m);
	inverse_matrix = (int*) malloc( sizeof(int) * k*w * k*w );
	for( j = 0; j < k*w * k*w; j++ )
		inverse_matrix[j] = lrand48() % 2;
	if( jerasure_invertible_bitmatrix( inverse_matrix, k*w ) )
		fprintf( stdout, "This matrix is invertible\n" );

	return 0;
}
